<?phpnamespace app\admin\controller;use app\admin\model\Setting as SettingModel;use think\facade\View;/** * 支付配置 */class Payment extends Controller{	/**     * 微信支付设置     */    public function wxpay()    {        return $this->updateEvent('wxpay');    }	    /**     * 更新设置事件     */    private function updateEvent(string $key)    {        if (!$this->request->isAjax()) {            $model = SettingModel::getItem($key);            return View::fetch($key, compact('model'));        }        $model = new SettingModel;        if ($model->edit($key,$this->postData('data'))) {            return $this->renderSuccess('更新成功');        }        return $this->renderError('更新失败');    }}